﻿using Abp.Domain.Entities;
using System;
using System.ComponentModel.DataAnnotations;

namespace Basefr.Core.Auditings.Entities
{
    /// <summary>
    /// AuditLog表基类
    /// </summary>
    public abstract class LogEntity : Entity<long>
    {
        public DateTime ExecutionTime { get; set; }

        public int ExecutionDuration { get; set; }

        public long? UserId { get; set; }

        public long? ImpersonatorUserId { get; set; }

        public int? TenantId { get; set; }

        public int? ImpersonatorTenantId { get; set; }

        [MaxLength(100)]
        public string ServiceName { get; set; }

        [MaxLength(100)]
        public string MethodName { get; set; }

        public string Parameters { get; set; }

        [MaxLength(50)]
        public string ClientIpAddress { get; set; }

        [MaxLength(50)]
        public string ClientName { get; set; }

        [MaxLength(500)]
        public string BrowserInfo { get; set; }

        [MaxLength(200)]
        public string CustomData { get; set; }

        public bool IsFailed { get; set; }

        public string ExceptionMessage { get; set; }

        public string ExceptionStackTrace { get; set; }
    }
}
